package com.xycake.controller.client;

import com.xycake.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/category")
public class CategoryController {

    @Autowired
    private CategoryService categoryService;

    @RequestMapping("/cake")
    public Map<String,Object> xycakeHome(Integer id){
        Map<String, Object> map = new HashMap<>();
        map.put("code", 0);
        map.put("data", categoryService.selectGoodsById(id));
        return map;
    }

}
